/* Replicate results in Tables 1-4 in Sean Farhang and Gregory Wawro,
"Institutional Dynamics on the U.S. Court of Appeals: Minority Representation
Under Panel Decision Making", JLEO 20:299-330 (2004) */

#delimit ;

use judge_level.dta;

/* Table 1 */

summarize outcome gender f1 m1 m2 race nw1 w1 w2 dim1 colldim1 opauthor
 genderauthor raceauthor nomauthor rclaim gclaim hclaim ageclaim
 relclaim noclaim revgender revrace defendant eeoc plainappeal
 bothappeal posture circ1 circ2 circ3 circ4 circ5 circ6 circ7 circ8
 circ10 circ11 circ12;


/* Model 1 in Table 2 (NB: results are slightly but not substantively
different from what is reported in the paper*/

logit outcome gender race dim1 opauthor genderauthor raceauthor
nomauthor rclaim gclaim hclaim ageclaim relclaim noclaim revgender
revrace defendant eeoc plainappeal bothappeal posture circ1 circ2
circ3 circ4 circ5 circ6 circ7 circ8 circ10 circ11 circ12;

/* Model 2 in Table 2 */

logit outcome gender f1 m1 m2 race nw1 w1 w2 dim1 colldim1 opauthor
 genderauthor raceauthor nomauthor rclaim gclaim hclaim ageclaim
 relclaim noclaim revgender revrace defendant eeoc plainappeal
 bothappeal posture circ1 circ2 circ3 circ4 circ5 circ6 circ7 circ8
 circ10 circ11 circ12;

/* GEE in Table 4 */

encode cindex, generate(cindex2);
  
xtset cindex2;
  
xtlogit outcome gender f1 m1 m2 race nw1 w1 w2 dim1 colldim1 opauthor
 genderauthor raceauthor nomauthor rclaim gclaim hclaim ageclaim
 relclaim noclaim revgender revrace defendant eeoc plainappeal
 bothappeal posture circ1 circ2 circ3 circ4 circ5 circ6 circ7 circ8
 circ10 circ11 circ12, pa;

clear;

/* Table 3 */

use case_level.dta;

logit plaintiff genone gentwo racone ractwo dim1mean femauth
   nwauth authordim1 rclaim gclaim hclaim ageclaim relclaim noclaim
   revgender revrace defendant eeoc pappeal bappeal posture circ1 circ2
   circ3 circ4 circ5 circ6 circ7 circ8 circ10 circ11 circ12;

  
